package com.ruoyi.market.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.market.domain.OrderDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.ruoyi.purchase.domain.OrderDetail
 */
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {

    /**
     * 根据订单号删除订单详情表
     * @param mkOrderIndent
     * @return
     */
    public boolean deleteByMkOrderIndent(String mkOrderIndent);

    /**
     * 批量添加
     * @param orderDetailList
     * @return
     */
    public boolean addDetails(List<OrderDetail> orderDetailList);

    /**
     * 根据订单号查询订单详情列表
     * @param mkOrderIndent
     * @return
     */
    public List<OrderDetail> getDetailListBymkOrderIndent(String mkOrderIndent);

    /**
     * 自定义修改
     * @param orderDetail
     * @return
     */
    public boolean modify(OrderDetail orderDetail);


    /**
     * 根据商品id查询订单详情
     * @param orderDetail
     * @return
     */
    public OrderDetail getByProductId(OrderDetail orderDetail);
}




